package cn.net.isir.core.datasource;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * @author liuxubo
 * @filename DynamicDataSource.java
 * @package cn.net.isir.core.datasource
 * @email lxb@isir.net.cn
 * @date 2019/02/21
 * @comment DynamicDataSource的类，继承AbstractRoutingDataSource并重写determineCurrentLookupKey方法
 * @since 1.8
 */
public class DynamicDataSource extends AbstractRoutingDataSource {

    @Override
    protected Object determineCurrentLookupKey() {
        return DataSourceHolder.getDataSources();
    }
}
